const mongoose = require('mongoose');

//用户模型对象
const userSchema = new mongoose.Schema({
  username:String,
  password:{
    type:String,
    select:false //不返回密码
  },
  avatar:{
    type:String,
    default:''
  },
})
//users 是db中连接的数据库demo下的表 
const User = new mongoose.model('users', userSchema)

module.exports ={
  User
}
